#pragma once

#include "DuiLib\UIlib.h"

#include "ColdEyes.h"
#include "ColdEyesDlg.h"
#include "ExHardDriver\ExHardDrive.h"

using namespace DuiLib;

class CUpdateMsgWnd
	:public WindowImplBase
{
public: 
	CUpdateMsgWnd();
	~CUpdateMsgWnd();

	virtual void OnFinalMessage(HWND);
	virtual CDuiString GetSkinFile();
	virtual LPCTSTR GetWindowClassName(void) const;
	virtual void Notify(TNotifyUI &msg);
	virtual void InitWindow();
	virtual void OnTimer(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled);
	virtual LRESULT OnSysCommand(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled);
	LRESULT HandleCustomMessage(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);


	void RefreshPro(int n);

	void SetMsg(LPCTSTR text1);


private:
	CProgressUI* pProgress;
	CTextUI* pVersion;


public:
	static int MessageBox(HWND hParent, LPCTSTR version) {
		CUpdateMsgWnd* pWnd = new CUpdateMsgWnd();

		pWnd->Create(hParent, _T("msgWnd"), WS_POPUP | WS_CLIPCHILDREN, WS_EX_TOOLWINDOW);
		pWnd->CenterWindow();
		pWnd->pVersion->SetText(version);
		return pWnd->ShowModal();
	}

};